package com.example.administrator.yuejian35.Home;

import com.example.administrator.yuejian35.Home.bean.Activity;
import com.example.administrator.yuejian35.Home.bean.Course;
import com.example.administrator.yuejian35.Home.bean.Game;
import com.example.administrator.yuejian35.Home.bean.Master;
import com.example.administrator.yuejian35.Home.bean.Result;
import com.example.administrator.yuejian35.Home.bean.SystemPic;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by HP on 2017/9/17.
 */

public interface HomeServer {
    //编写接口
    @GET("System/getSystemPic") //系统轮播图
    Call<List<SystemPic>> systempic();

    @GET("Activity/getAllActivity") //所有活动列表
    Call<List<Activity>> activitylist();

    @GET("Master/getAllMaster") //所有大师列表
    Call<List<Master>> masterlist();

    @GET("Game/getAllGame") //所有比赛列表
    Call<List<Game>> gamelist();

    @GET("Activity/getActivity") //当前活动
    Call<Activity> activity(
            @Query("aid") int aid
    );

    @GET("Master/getMaster") //当前大师列表
    Call<Master> master(
            @Query("coachid") int coachid
    );

    @GET("Game/getGame") //当前比赛列表
    Call<Game> game(
            @Query("gid") int gid
    );

    @GET("Master/getCourse") //大师的课程
    Call<List<Course>> master_video(
            @Query("coachid") int coachid
    );

    @GET("Activity/applyActivity") //活动报名
    Call<Result> apply_activity(
            @Query("aid") String aid,
            @Query("uid") String uid,
            @Query("psum") int psum,
            @Query("msum") String msum
    );

    @GET("Activity/collectActivity") //收藏活动
    Call<Result> collect(
            @Query("aid") String aid,
            @Query("uid") String uid,
            @Query("type") String type,
            @Query("id") String id
    );



    @GET("Master/collectMaster") //收藏大师
    Call<Result> master_collect(
            @Query("coachid") String coachid,
            @Query("uid") String uid,
            @Query("type") String type,
            @Query("id") String id
    );


    @GET("Game/hits") //点赞比赛
    Call<Result> game_hit(
            @Query("gid") String gid,
            @Query("type") String type
    );

    @GET("Post/hits") //点赞帖子
    Call<Result>  post_hit(
            @Query("pid") String pid,
            @Query("type") String type
    );



}
